home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 60.zip / BS1 part 60 / Highspeed pascal.adf / Interface / Hardware.pas < prev    next >
Pascal/Delphi Source File  |  1992-01-16  |  9KB  |  417 lines

  1. Unit Hardware;
  2.  
  3. Interface
  4. Uses Exec;
  5.  
  6. Type
  7.   tCIA = Record
  8.           ciapra: ShortInt;
  9.           pad0: Array [0..254] of ShortInt;
  10.           ciaprb: ShortInt;
  11.           pad1: Array [0..254] of ShortInt;
  12.           ciaddra: ShortInt;
  13.           pad2: Array [0..254] of ShortInt;
  14.           ciaddrb: ShortInt;
  15.           pad3: Array [0..254] of ShortInt;
  16.           ciatalo: ShortInt;
  17.           pad4: Array [0..254] of ShortInt;
  18.           ciatahi: ShortInt;
  19.           pad5: Array [0..254] of ShortInt;
  20.           ciatblo: ShortInt;
  21.           pad6: Array [0..254] of ShortInt;
  22.           ciatbhi: ShortInt;
  23.           pad7: Array [0..254] of ShortInt;
  24.           ciatodlow: ShortInt;
  25.           pad8: Array [0..254] of ShortInt;
  26.           ciatodmid: ShortInt;
  27.           pad9: Array [0..254] of ShortInt;
  28.           ciatodhi: ShortInt;
  29.           pad10: Array [0..254] of ShortInt;
  30.           unusedreg: ShortInt;
  31.           pad11: Array [0..254] of ShortInt;
  32.           ciasdr: ShortInt;
  33.           pad12: Array [0..254] of ShortInt;
  34.           ciaicr: ShortInt;
  35.           pad13: Array [0..254] of ShortInt;
  36.           ciacra: ShortInt;
  37.           pad14: Array [0..254] of ShortInt;
  38.           ciacrb: ShortInt;
  39.         End;
  40.  
  41.   pAudChannel = ^tAudChannel;
  42.   tAudChannel = Record
  43.           ac_ptr: pInteger;
  44.           ac_len: Integer;
  45.           ac_per: Integer;
  46.           ac_vol: Integer;
  47.           ac_dat: Integer;
  48.           ac_pad: Array [0..1] of Integer;
  49.         End;
  50.  
  51.   pSpriteDef = ^tSpriteDef;
  52.   tSpriteDef = Record
  53.           pos: Integer;
  54.           ctl: Integer;
  55.           dataa: Integer;
  56.           datab: Integer;
  57.         End;
  58.  
  59.   tCustom = Record
  60.           bltddat: Integer;
  61.           dmaconr: Integer;
  62.           vposr: Integer;
  63.           vhposr: Integer;
  64.           dskdatr: Integer;
  65.           joy0dat: Integer;
  66.           joy1dat: Integer;
  67.           clxdat: Integer;
  68.           adkconr: Integer;
  69.           pot0dat: Integer;
  70.           pot1dat: Integer;
  71.           potinp: Integer;
  72.           serdatr: Integer;
  73.           dskbytr: Integer;
  74.           intenar: Integer;
  75.           intreqr: Integer;
  76.           dskpt: Pointer;
  77.           dsklen: Integer;
  78.           dskdat: Integer;
  79.           refptr: Integer;
  80.           vposw: Integer;
  81.           vhposw: Integer;
  82.           copcon: Integer;
  83.           serdat: Integer;
  84.           serper: Integer;
  85.           potgo: Integer;
  86.           joytest: Integer;
  87.           strequ: Integer;
  88.           strvbl: Integer;
  89.           strhor: Integer;
  90.           strlong: Integer;
  91.           bltcon0: Integer;
  92.           bltcon1: Integer;
  93.           bltafwm: Integer;
  94.           bltalwm: Integer;
  95.           bltcpt: Pointer;
  96.           bltbpt: Pointer;
  97.           bltapt: Pointer;
  98.           bltdpt: Pointer;
  99.           bltsize: Integer;
  100.           pad2d: Array [0..2] of Integer;
  101.           bltcmod: Integer;
  102.           bltbmod: Integer;
  103.           bltamod: Integer;
  104.           bltdmod: Integer;
  105.           pad34: Array [0..3] of Integer;
  106.           bltcdat: Integer;
  107.           bltbdat: Integer;
  108.           bltadat: Integer;
  109.           pad3b: Array [0..3] of Integer;
  110.           dsksync: Integer;
  111.           cop1lc: LongInt;
  112.           cop2lc: LongInt;
  113.           copjmp1: Integer;
  114.           copjmp2: Integer;
  115.           copins: Integer;
  116.           diwstrt: Integer;
  117.           diwstop: Integer;
  118.           ddfstrt: Integer;
  119.           ddfstop: Integer;
  120.           dmacon: Integer;
  121.           clxcon: Integer;
  122.           intena: Integer;
  123.           intreq: Integer;
  124.           adkcon: Integer;
  125.           aud: Array [0..3] of tAudChannel;
  126.           bplpt: Pointer;
  127.           pad7c: Array [0..3] of Integer;
  128.           bplcon0: Integer;
  129.           bplcon1: Integer;
  130.           bplcon2: Integer;
  131.           pad83: Integer;
  132.           bpl1mod: Integer;
  133.           bpl2mod: Integer;
  134.           pad86: Array [0..1] of Integer;
  135.           bpldat: Array [0..5] of Integer;
  136.           pad8e: Array [0..1] of Integer;
  137.           sprpt: Pointer;
  138.           spr: Array [0..7] of tSpriteDef;
  139.           color: Array [0..31] of Integer;
  140.         End;
  141.  
  142.   pbltnode = ^tbltnode;
  143.   tbltnode = Record
  144.           n: pbltnode;
  145.           function_: pPointer;
  146.           stat: ShortInt;
  147.           blitsize: Integer;
  148.           beamsync: Integer;
  149.           cleanup: pPointer;
  150.         End;
  151.  
  152.  
  153.  
  154.   pCIA = ^tCIA;
  155.   pCustom = ^tCustom;
  156.  
  157.  
  158. Var
  159.   ciaa:        pCIA    absolute $BFE001;
  160.   ciab:        pCIA    absolute $BFD000;
  161.   custom:    pCustom    absolute $DFF000;
  162. Const
  163.   ADKF_PRE000NS = $0;
  164.   VSIZEBITS = $A;
  165.   DMAF_BLITTER = $40;
  166.   INTF_PORTS = $8;
  167.   DEST = $100;
  168.   OCTANT1 = $10;
  169.   CIAICRF_FLG = $10;
  170.   OCTANT2 = $0;
  171.   ADKB_MSBSYNC = $9;
  172.   ADKF_UARTBRK = $800;
  173.   OCTANT3 = $8;
  174.   CIAB_DSKTRACK0 = $4;
  175.   CIAB_OVERLAY = $0;
  176.   CIAF_DSKSTEP = $1;
  177.   OCTANT4 = $14;
  178.   CIAB_DSKCHANGE = $2;
  179.   ADKF_PRE140NS = $2000;
  180.   OCTANT5 = $1C;
  181.   OCTANT6 = $C;
  182.   ADKB_USE3PN = $7;
  183.   ADKF_MSBSYNC = $200;
  184.   OCTANT7 = $4;
  185.   CIACRAB_RUNMODE = $3;
  186.   CIAB_PRTRBUSY = $0;
  187.   CIAF_DSKTRACK0 = $10;
  188.   CIAF_OVERLAY = $1;
  189.   OCTANT8 = $18;
  190.   CIACRBB_RUNMODE = $3;
  191.   CIAB_DSKPROT = $3;
  192.   CIAF_DSKCHANGE = $4;
  193.   INTB_RBF = $B;
  194.   INTB_TBE = $0;
  195.   ADKF_PRE280NS = $4000;
  196.   CIACRAB_OUTMODE = $2;
  197.   ADKF_USE3PN = $80;
  198.   ADKF_PRE560NS = $6000;
  199.   CIACRBB_OUTMODE = $2;
  200.   CIACRAF_RUNMODE = $8;
  201.   CIAB_GAMEPORT0 = $6;
  202.   CIAF_PRTRBUSY = $1;
  203.   CIACRBF_RUNMODE = $8;
  204.   CIAB_GAMEPORT1 = $7;
  205.   CIAB_PRTRPOUT = $1;
  206.   CIAF_DSKPROT = $8;
  207.   INTF_RBF = $800;
  208.   ADKB_USE3VN = $3;
  209.   CIAB_PRTRSEL = $2;
  210.   INTF_TBE = $1;
  211.   CIACRAB_INMODE = $5;
  212.   CIACRAF_OUTMODE = $4;
  213.   CIAB_COMDSR = $3;
  214.   CLEANUP = $40;
  215.   CIACRBF_OUTMODE = $4;
  216.   CIAB_COMDTR = $7;
  217.   CIAB_COMCTS = $4;
  218.   CIAF_GAMEPORT0 = $40;
  219.   CIAF_GAMEPORT1 = $80;
  220.   CIAF_PRTRPOUT = $2;
  221.   ADKF_USE3VN = $8;
  222.   FILL_CARRYIN = $4;
  223.   CIAB_COMCD = $5;
  224.   CIAF_PRTRSEL = $4;
  225.   CIACRAF_INMODE = $20;
  226.   CIAF_COMDSR = $8;
  227.   CIAF_COMDTR = $80;
  228.   CIAF_COMCTS = $10;
  229.   DMAB_COPPER = $7;
  230.   ASHIFTSHIFT = $C;
  231.   CIAF_COMCD = $20;
  232.   ADKB_SETCLR = $F;
  233.   BSHIFTSHIFT = $C;
  234.   CIAB_DSKRDY = $5;
  235.   DMAB_MASTER = $9;
  236.   AUL = $4;
  237.   DMAF_COPPER = $80;
  238.   DMAB_SETCLR = $F;
  239.   ADKF_SETCLR = $50000;
  240.   CIACRAB_SPMODE = $6;
  241.   CIAF_DSKRDY = $20;
  242.   DMAF_MASTER = $200;
  243.   NANBNC = $1;
  244.   BC1F_DESC = $2;
  245.   DMAF_SETCLR = $8000;
  246.   DMAB_RASTER = $8;
  247.   CIAICRB_TA = $0;
  248.   CIACRAF_SPMODE = $40;
  249.   CIAB_COMRTS = $6;
  250.   INTB_DSKSYNC = $C;
  251.   BLITREVERSE = $2;
  252.   CIAICRB_TB = $1;
  253.   DMAB_AUD0 = $0;
  254.   INTB_DSKBLK = $1;
  255.   DMAF_RASTER = $100;
  256.   DMAB_AUD1 = $1;
  257.   BC0B_SRCA = $B;
  258.   FILL_XOR = $10;
  259.   DMAB_AUD2 = $2;
  260.   BC0B_SRCB = $A;
  261.   SUD = $10;
  262.   CIAICRF_TA = $1;
  263.   CIAF_COMRTS = $40;
  264.   DMAB_AUD3 = $3;
  265.   DMAB_SPRITE = $5;
  266.   INTF_DSKSYNC = $1000;
  267.   BC0B_SRCC = $9;
  268.   CIAICRF_TB = $2;
  269.   DMAF_AUD0 = $1;
  270.   INTF_DSKBLK = $2;
  271.   CIAICRB_IR = $7;
  272.   DMAF_AUD1 = $2;
  273.   BC0F_SRCA = $800;
  274.   CIACRBB_ALARM = $7;
  275.   DMAF_AUD2 = $4;
  276.   BC0F_SRCB = $400;
  277.   DMAF_AUDIO = $F;
  278.   DMAF_AUD3 = $8;
  279.   DMAF_SPRITE = $20;
  280.   INTB_SOFTINT = $2;
  281.   BC0F_SRCC = $200;
  282.   CIAICRB_SETCLR = $7;
  283.   BC0B_DEST = $8;
  284.   CIAICRF_IR = $80;
  285.   CIACRBF_ALARM = $80;
  286.   ADKB_PRECOMP0 = $D;
  287.   SUL = $8;
  288.   CIAB_DSKDIREC = $1;
  289.   INTF_SOFTINT = $4;
  290.   ADKB_PRECOMP1 = $E;
  291.   OVFLAG = $20;
  292.   CIAICRF_SETCLR = $80;
  293.   BC0F_DEST = $100;
  294.   CIAICRB_SP = $3;
  295.   ADKF_PRECOMP0 = $2000;
  296.   FILL_OR = $8;
  297.   CIAF_DSKDIREC = $2;
  298.   ADKF_PRECOMP1 = $4000;
  299.   CIAICRF_SP = $8;
  300.   INTB_SETCLR = $F;
  301.   CIACRBF_IN_CNT = $20;
  302.   ANBNC = $10;
  303.   NABNC = $4;
  304.   NANBC = $2;
  305.   ONEDOT = $2;
  306.   CIACRAB_TODIN = $7;
  307.   INTF_SETCLR = $50000;
  308.   INTB_AUD0 = $7;
  309.   CIACRAF_TODIN = $80;
  310.   INTB_AUD1 = $8;
  311.   INTB_AUD2 = $9;
  312.   INTB_AUD3 = $A;
  313.   CIACRAB_LOAD = $4;
  314.   CIAB_DSKSEL0 = $3;
  315.   INTF_AUD0 = $80;
  316.   CIACRBB_LOAD = $4;
  317.   CIAB_DSKSEL1 = $4;
  318.   INTF_AUD1 = $100;
  319.   CIAB_DSKSEL2 = $5;
  320.   INTF_AUD2 = $200;
  321.   CIACRBB_INMODE0 = $5;
  322.   CIAB_DSKSEL3 = $6;
  323.   INTF_AUD3 = $400;
  324.   CIACRBB_INMODE1 = $6;
  325.   CIACRAF_LOAD = $10;
  326.   CIAF_DSKSEL0 = $8;
  327.   DMAB_DISK = $4;
  328.   ADKB_FAST = $8;
  329.   CIACRBF_LOAD = $10;
  330.   CIAF_DSKSEL1 = $10;
  331.   A_XOR_C = $5A;
  332.   CIAF_DSKSEL2 = $20;
  333.   INTB_COPER = $4;
  334.   CIACRBF_INMODE0 = $20;
  335.   CIAF_DSKSEL3 = $40;
  336.   CIACRBF_INMODE1 = $40;
  337.   DMAF_DISK = $10;
  338.   ADKF_FAST = $100;
  339.   CIACRAB_START = $0;
  340.   CIACRBB_START = $0;
  341.   INTF_COPER = $10;
  342.   CIACRBF_IN_TA = $40;
  343.   INTB_INTEN = $E;
  344.   CIACRAF_START = $1;
  345.   ABNC = $40;
  346.   ANBC = $20;
  347.   NABC = $8;
  348.   CIACRBF_START = $1;
  349.   CIAB_LED = $1;
  350.   CIACRAB_PBON = $1;
  351.   INTF_INTEN = $4000;
  352.   ADKB_USE0P1 = $4;
  353.   CIACRBB_PBON = $1;
  354.   INTB_VERTB = $5;
  355.   CIAB_DSKSIDE = $2;
  356.   ADKB_USE1P2 = $5;
  357.   A_OR_B = $FC;
  358.   CIAF_LED = $2;
  359.   A_OR_C = $FA;
  360.   CIACRAF_PBON = $2;
  361.   ADKB_USE2P3 = $6;
  362.   ADKF_USE0P1 = $10;
  363.   CIAICRB_ALRM = $2;
  364.   CIACRBF_PBON = $2;
  365.   INTF_VERTB = $20;
  366.   HSIZEMASK = $3F;
  367.   CIAF_DSKSIDE = $4;
  368.   INTB_EXTER = $D;
  369.   ADKB_USE0V1 = $0;
  370.   ADKF_USE1P2 = $20;
  371.   A_TO_D = $F0;
  372.   SIGNFLAG = $40;
  373.   ADKB_MFMPREC = $C;
  374.   DMAB_BLTDONE = $E;
  375.   ADKB_USE1V2 = $1;
  376.   ADKF_USE2P3 = $40;
  377.   LINEMODE = $1;
  378.   CIAICRF_ALRM = $4;
  379.   CIAB_DSKMOTOR = $7;
  380.   DMAB_BLITHOG = $A;
  381.   INTF_EXTER = $2000;
  382.   ADKB_USE2V3 = $2;
  383.   ADKF_USE0V1 = $1;
  384.   DMAB_BLTNZERO = $D;
  385.   ADKF_MFMPREC = $1000;
  386.   HSIZEBITS = $6;
  387.   DMAF_ALL = $1FF;
  388.   DMAF_BLTDONE = $4000;
  389.   ADKF_USE1V2 = $2;
  390.   CIAF_DSKMOTOR = $80;
  391.   DMAF_BLITHOG = $400;
  392.   INTB_BLIT = $6;
  393.   ADKF_USE2V3 = $4;
  394.   MAXBYTESPERROW = $80;
  395.   DMAF_BLTNZERO = $2000;
  396.   CIACRBF_IN_CNT_TA = $60;
  397.   ADKB_WORDSYNC = $A;
  398.   INTF_BLIT = $40;
  399.   VSIZEMASK = $3FF;
  400.   SRCA = $800;
  401.   SRCB = $400;
  402.   CIACRBF_IN_PHI2 = $0;
  403.   ADKF_WORDSYNC = $400;
  404.   ABC = $80;
  405.   SRCC = $200;
  406.   CLEANME = $40;
  407.   DMAB_BLITTER = $6;
  408.   INTB_PORTS = $3;
  409.   CIAICRB_FLG = $4;
  410.   ADKB_UARTBRK = $B;
  411.   CIAB_DSKSTEP = $0;
  412.  
  413.  
  414.  
  415.  
  416. End.
  417.